export const useVModel = <T, K extends keyof T>(props: T, name: K) => {
  const emit = getCurrentInstance?.()?.emit;
  return computed({
    get() {
      return toRaw(props[name]);
    },
    set(v) {
      if (!emit) {
        console.log("没有emit");
        return;
      }
      emit(`update:${name as string}`, v);
    },
  });
};
